package controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import persistence.AccesoBD;
/**
 *
 * @author Eocampo
 */
public class GenerarHTMLNuevaPropiedad extends GenerarHTMLGeneral{
    
    public GenerarHTMLNuevaPropiedad(){
    
    }
    
    public String generarHTMLMainContent (){
        String html="";
        html+="<div id=\"main_content\">\n";
        html+=  "<div id=\"admin_header\">\n";
        html+=      "<div class=\"admin_editoffer_title\">Nueva Propiedad</div>\n";
        html+=  "</div>\n";
        html+=  "<div id=\"admin_header_border\"></div>\n";

        return html;
    }

    public String generarHTMLAddTab(){
        String html="";
        //if(request.getParameter("agregarNuevaPropiedad")!= null){
          //  try{
            //    int id= (Integer.parseInt(request.getParameter("nroId")));
              //  Double precio =(Double.parseDouble(request.getParameter("precioInm")));
              //  String descripcion=request.getParameter("descrInm");
           // }catch (Exception e){
             
            //}
        //}
        
        html+="<div class=\"add_tab\">\n";
        html+="<form method=\"post\">\n";
        html+=  "<div class=\"form_contact\">\n";
        html+=      "<form action=\"NuevaProp.jsp\"name=\"propToADD\">";
        html+=          "<div class=\"adminform_row_contact\"><label class=\"adminleft\">ID<span>(**)</span> : </label><input type=\"text\" name=\"nroID\" class=\"form_input_contact\" value=\"\"/></div>\n";
        html+=          "<div class=\"adminform_row_contact\"><label class=\"adminleft\">Precio<span>(*) </span>: </label><input type=\"text\" name=\"precioInm\"  class=\"form_input_contact\" value=\"\"/></div>\n";
        html+=          "<div class=\"adminform_row_contact\"><label class=\"adminleft\">Ubicaci&oacute;n<span>(*) </span>: </label>\n";
        //html+=              //"<form name=\"ubicacion\">";              
        html+=                  "<select class=\"form_select\">\n";
        html+=                      "<option>--------------------------------------------------------</option>\n";
        html+=                      "<option>Alberdi</option>\n";
        html+=                      "<option>Banda Norte</option>\n";
        html+=                      "<option>Macro-centro</option>\n";
        html+=                      "<option>Micro-centro</option>\n";
        html+=                      "<option>Otros</option>\n";
        html+=                  "</select>\n";
       // html+=              //"</form>";
        html+=          "</div>\n";//endadminform_row_contact(ubicacion)

        html+=          "<div class=\"adminform_row_contact\"><label class=\"adminleft\">Inmueble<span>(*) </span>: </label>\n";
       // html+=              "<form name=\"inmueble\">";
        html+=                  "<select class=\"form_select\">\n";
        html+=                      "<option>--------------------------------------------------------</option>\n";
        html+=                      "<option>Departamento</option>\n";
        html+=                      "<option>Casa</option>\n";
        html+=                      "<option>Oficina</option>\n";
        html+=                      "<option>Local</option>\n";
        html+=                      "<option>Sal&oacute;n</option>\n";
        html+=                  "</select>\n";
        //html+=              "</form>";
        html+=          "</div>\n";//endAdminform_row_contact(inmueble)

        html+=          "<div class=\"adminform_row_contact\"><label class=\"adminleft\">Operaci&oacute;n<span>(*) </span>: </label>\n";
        //html+=              "<form name=\"operacion\">";
        html+=                  "<select class=\"form_select\">\n";
        html+=                      "<option>--------------------------------------------------------</option>\n";
        html+=                      "<option>Alquiler</option>\n";
        html+=                      "<option>Venta</option>\n";
        html+=                  "</select>\n";
        //html+=              "</form>";
        html+=          "</div>\n";//endAdminform_row_contact(operacion)    
        html+=          "<div class=\"adminform_row_contact\"><label class=\"adminleft\">Imagen 1<span>(*) </span>: </label><input type=\"file\" class=\"form_input_contact\"/></div>\n";
        html+=          "<div class=\"adminform_row_contact\"><label class=\"adminleft\">Imagen 2<span>(*) </span>: </label><input type=\"file\" class=\"form_input_contact\"/></div>\n";
        html+=          "<div class=\"adminform_row_contact\"><label class=\"adminleft\">Imagen 3<span>(*) </span>: </label><input type=\"file\" class=\"form_input_contact\"/></div>\n";
        html+=          "<div class=\"adminform_row_contact\"><label class=\"adminleft\">Imagen 4<span>(*) </span>: </label><input type=\"file\" class=\"form_input_contact\"/></div>\n";
        html+=          "<div class=\"adminform_row_contact\"><label class=\"adminleft\">Descripci&oacute;n<span>(*)</span>: </label><textarea name=\"descrInm\" rows=\"\" cols=\"\" ></textarea></div>\n";
        html+=          "<div style=\"float:right; padding:10px 25px 0 0;\">\n";
        html+=              "<input type=\"hidden\" name=\"agregarNuevaPropiedad\" />\n";
        html+=              "<div class=\"right_button\"><a href=\"#\" OnClick=\"guardarProp();\">Guardar</a></div>";
        html+=              "<div class=\"right_button\"><a href=\"Admin.jsp\">Cancelar</a></div>\n";
        html+=      "</form>";  
        html+=  "</div>\n";//EndFormContact
        html+=  "</form>\n";
        html+=  "<div class=\"admin_footer_help\">\n";
        html+=      "<p><span>&nbsp;&nbsp;&nbsp;&nbsp;(*)</span> Campos requeridos para editar y/o modificar una propiedad.</p>\n";
        html+=      "<p><span>&nbsp;&nbsp;&nbsp;&nbsp;(**)</span> El ID de una propiedad debe ser &uacute;nico.</p>\n";
        html+=  "</div>\n";//EndAdmin_footer_help    
        html+="</div>\n";//EndAdd_tab
        html+="</div>\n";//endOfMain_content
        return html;
    }

}

